//package com.linfnn.demo.Mapper;
//
//import com.linfnn.demo.Model.Assessment;
//import org.apache.ibatis.annotations.*;
//
//@Mapper
//public interface AssessmentMapper {
//
//    @Insert("INSERT INTO Assessment (评估名称, 评估结果, 建议, 创建时间, 状态) VALUES (#{assessmentName}, #{assessmentResult}, #{suggestion}, #{createTime}, #{status})")
//    void insertAssessment(Assessment assessment);
//
//    @Select("SELECT * FROM Assessment WHERE 评估名称='#{assessmentName}'")
//    Assessment selectAssessmentByName(String assessmentName);
//
//    @Update("UPDATE Assessment SET 评估名称=#{assessmentName}, 评估结果=#{assessmentResult}, 建议=#{suggestion}, 创建时间=#{createTime}, 状态=#{status} WHERE id=#{id}")
//    void updateAssessment(Assessment assessment);
//
//    @Delete("DELETE FROM Assessment WHERE id = #{id}")
//    void deleteAssessment(int id);
//
//}


package com.linfnn.demo.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linfnn.demo.Model.Assessment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;


@Mapper
@Transactional
public interface AssessmentMapper extends BaseMapper<Assessment> {

    // 这里可以添加其他自定义的查询方法，基本的CRUD操作已经由BaseMapper提供N
    @Select("SELECT * FROM Assessment WHERE assessmentName = #{assessmentName}")
    Assessment selectAssessmentByName( String assessmentName);
}
